package bigmath;

import java.io.IOException;

public class ExceptionDemo3 {
    public static void main(String[] args){
        A a = new B();
        try {
            a.m();//重写看对象
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
class A{
    public void m() throws IOException{
        System.out.println("A");
    }
}
class B extends A{
    @Override
    public void m() throws NullPointerException {//运行时异常不管，编译时异常要小于父类编译时异常的范围
        System.out.println("B");
    }

}